# Maintainer: David Sugar <tychosoft@gmail.com>
# Contributor: David Sugar <tychosoft@gmail.com>
pkgname=libosip2
# Needs to be kept in sync with libexosip2
pkgver=5.3.1
pkgrel=1
pkgdesc="oSIP is an implementation of SIP"
url="https://www.gnu.org/software/osip/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="autoconf automake libtool"
options="libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="https://ftp.gnu.org/gnu/osip/libosip2-$pkgver.tar.gz"

# secfixes:
#   5.3.1-r0:
#     - CVE-2022-41550

prepare() {
	default_prepare
	./autogen.sh
	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-static \
		--with-gnu-ld
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
cd9db7a736cca90c6862b84c4941ef025f5affab8af9bbc02ce0dd3310a2c555e0922c1bfa72d8ac08791fa1441bbcc30b627d52ca8b51f3471573a10ac82a00  libosip2-5.3.1.tar.gz
"
